﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RecursoListGrid.ascx.cs"

 Inherits="UILGestion.Control.RecursoListGrid" %>


     <%@ Register Assembly="CustomControls" Namespace="CustomControls" TagPrefix="cc1" %>
<script src="../Scripts/controlGrid.js" type="text/javascript"></script>
<link href="../css/main.css" rel="stylesheet" type="text/css" />
 <script type="text/javascript">
     function SelectAll(frm, id) {

         var frm = document.getElementById("itemPlaceHolderContainer");
         for (i = 1; i < frm.rows.length; i++) {
             var checkbox = frm.rows[i].cells[0].childNodes[0];
             if (checkbox != null)
                 checkbox.checked = document.getElementById(id).checked;
         }
     };
    </script>
                        

<asp:DataPager ID="pager" PagedControlID="ListView1" runat="server" >
    <Fields>
      <cc1:PagerField NextPageImageUrl="~/Images/arrow_right2.gif" PreviousPageImageUrl="~/images/arrow_left.gif" />
    </Fields>
</asp:DataPager>
<asp:ListView ID="ListView1" runat="server" OnDataBound="ListView1_DataBound"   ClientIDMode="Static"  
    DataKeyNames="idInternal" onitemdatabound="ListView1_ItemDataBound">
    <LayoutTemplate>
        <table id="itemPlaceHolderContainer" border="0" runat="server">
            <tr id="Tr1" runat="server"  class="Heading secTitle AreaHeading ms-crm-List-Header">
             <th>
            
           <asp:CheckBox runat="server" ID="chkSelectAll" ClientIDMode="Static" onclick="SelectAll('ListView1','chkSelectAll')" />
            </th>
               <th id="Th1" runat="server">
                    <asp:LinkButton ID="lb2" CommandName="Sort" CommandArgument="desPresupuesto" runat="server">Presupuesto</asp:LinkButton>
                </th>
               <th id="Th2" runat="server">
                    <asp:LinkButton ID="LinkButton1" CommandName="Sort" CommandArgument="desPartida" runat="server">Partida</asp:LinkButton>
                </th>
                <th id="Th3" runat="server">
                    <asp:LinkButton ID="LinkButton2" CommandName="Sort" CommandArgument="codigo" runat="server">codigo</asp:LinkButton>
                </th>
                <th id="Th4" runat="server">
                    <asp:LinkButton ID="LinkButton3" CommandName="Sort" CommandArgument="descripcion" runat="server">descripcion</asp:LinkButton>
                </th>

                <th id="Th5" runat="server">
                    <asp:LinkButton ID="LinkButton4" CommandName="Sort" CommandArgument="cantidad" runat="server">cantidad</asp:LinkButton>
                </th>
                 <th id="Th9" runat="server">
                    <asp:LinkButton ID="LinkButton8" CommandName="Sort" CommandArgument="cantidad" runat="server">unidad</asp:LinkButton>
                </th>
                <th id="Th6" runat="server">
                    <asp:LinkButton ID="LinkButton5" CommandName="Sort" CommandArgument="precio" runat="server">precio</asp:LinkButton>
                </th>
                <th id="Th7" runat="server">
                    <asp:LinkButton ID="LinkButton6" CommandName="Sort" CommandArgument="parcial" runat="server">total</asp:LinkButton>
                </th>

                 <th id="Th8" runat="server">
                    <asp:LinkButton ID="LinkButton7" CommandName="Sort" CommandArgument="saldo" runat="server">Saldo</asp:LinkButton>
                </th>
            </tr>
            <tr id="itemPlaceholder" runat="server">
            </tr>
        </table>



    </LayoutTemplate>
    <ItemTemplate>
        <tr style='background-color: <%# (Container.DataItemIndex % 2 == 0)?"#eee":"#fff" %>'>
            <td>
         
             <asp:CheckBox runat="server" ID="chkEmployeeSelector"  />
         
                
            </td>
            <td width="100px" >
                    <%# Eval("desPresupuesto")%> <br />
            </td>
            
           
            <td width="100px">
            <%# Eval("desPartida")%> <br />
            </td>
            
            <td width="350px">
             <%# Eval("codigo")%> <br />
            </td>
            
            <td width="350px">
             <%# Eval("descripcion")%> <br />
            </td>  
            <td width="350px">
             <%# Eval("unidad")%> <br />
            </td>
            <td width="350px">
             <%# Eval("cantidad")%> <br />
            </td>
            <td width="350px">
             <%# Eval("precioStr")%> <br />
            </td>
              
            </td>
            <td width="100px"  align="right">
                    <%# Eval("parcialStr")%> <br />
            </td>
             <td width="100px"  align="right">
                    <%# Eval("saldoStr")%> <br />
            </td>
        </tr>
    </ItemTemplate>
    <EmptyDataTemplate>
        <table id="Table1" runat="server" style="">
            <tr>
                <td>
                    <h2 style="color: Red ; font-size:small">
                  
                        No existe Informacion.</h2>
                </td>
            </tr>
        </table>
    </EmptyDataTemplate>
</asp:ListView>


  



